package com.hgj.common.ws.controller;


import com.alibaba.fastjson.JSONObject;
import com.hgj.common.ws.server.HSocket;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@RestController
@RequestMapping("/t")
public class RestTest {

    @GetMapping
    public String t(){return "hhh";}


    @PostMapping
    public void t2(@RequestBody JSONObject jsonObject) throws IOException {
        HSocket.publishMessage("test",jsonObject,"id");
    }
}
